<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<div class="mainBody" style="overflow: auto;">
    <div class="editBody">
        <?php echo form_open('user_admin/add'); ?>
        <div class="bodyTitle" style="">
            <div class="titleIcon addTitle"></div>
            <p class="titleName fontDinproMedium" style="">ADD USER</p>
        </div>
        <div class="bodyDiv fontDinpro">
            <div class="divContent">
                <p class="fontDinproMedium">Real Name:</p>
                <div class="rightContent">
                    <input type="text" class="input-text fontDinpro" id="rname" name="rname" />
                </div>
            </div>
        </div>
        <div class="bodyDiv fontDinpro">
            <div class="divContent">
                <p class="fontDinproMedium">User Name:</p>
                <div class="rightContent">
                    <input type="text" class="input-text fontDinpro" id="uname" name="uname" />
                    <p class="waring fontDinpro">*3-16位用户名称.</p>
                </div>
                <?php if(form_error('uname')!=''){ ?>
                    <label class="waring fontDinpro noFloat snapRight autoWidth"><?php echo form_error('uname'); ?></label>
                <?php } ?>
            </div>
        </div>
        <div class="bodyDiv fontDinpro">
            <div class="divContent">
                <p class="fontDinproMedium">Password:</p>
                <div class="rightContent">
                    <input type="password" class="input-text fontDinpro" maxlength="16" id="pwd" name="pwd" />
                    <p class="waring fontDinpro">*6-16位用户密码.</p>
                </div>
                <?php if(form_error('password')!=''){ ?>
                    <label class="waring fontDinpro noFloat snapRight autoWidth"><?php echo form_error('password'); ?></label>
                <?php } ?>
            </div>
        </div>
        <div class="bodyDiv fontDinpro">
            <div class="divContent">
                <p class="fontDinproMedium">Confirm Password:</p>
                <div class="rightContent">
                    <input type="password" class="input-text fontDinpro" maxlength="16" id="confirm_pwd" name="confirm_pwd" />
                    <p class="waring fontDinpro">*6-16位用户密码.</p>
                </div>
                <?php if(form_error('confirm_pwd')!=''){ ?>
                    <label class="waring fontDinpro noFloat snapRight autoWidth"><?php echo form_error('confirm_pwd'); ?></label>
                <?php } ?>
            </div>
        </div>
        <div class="bodyDiv fontDinpro">
            <div class="divContent">
                <p class="fontDinproMedium">User Email:</p>
                <div class="rightContent">
                    <input type="text" class="input-text fontDinpro" id="email" name="email" />
                    <p class="waring fontDinpro">*有效的EMAIL地址.</p>
                </div>
                <?php if(form_error('email')!=''){ ?>
                    <label class="waring fontDinpro noFloat snapRight autoWidth"><?php echo form_error('email'); ?></label>
                <?php } ?>
            </div>
        </div>
        <div class="bodyDiv fontDinpro">
            <div class="divContent">
                <p class="fontDinproMedium">Roles:</p>
                <div class="rightContent">
                    <div class="locationGroup listGroupDown listGroup">
                        <?php $k=array_keys($roles); $r=$roles[$k[0]]; ?>
                        <a class="btnLeft btnPrimary fontDinpro" href="javascript:void(0)" value="<?php echo $k[0]; ?>">
                            <?php echo $r; ?>
                        </a>
                        <a class="btnRight btnPrimary" href="javascript:void(0)"><span class="caretBottom"></span></a>
                        <input type="hidden" id="role" name="role" value="<?php echo $k[0]; ?>" />
                        <ul class="dropDownList fontDinpro">
                            <?php foreach($roles as $k=>$r){?>
                                <li>
                                    <a href="javascript:void(0)" class="fontDinpro" value="<?php echo $k; ?>">
                                        <?php echo $r; ?>
                                    </a>
                                </li>
                            <?php } ?>
                        </ul>
                    </div>
                    <label class="fontDinpro">*设置用户组.</label>
                </div>
                <?php if(form_error('role')!=''){ ?>
                    <label class="waring fontDinpro noFloat snapRight autoWidth"><?php echo form_error('role'); ?></label>
                <?php } ?>
            </div>
        </div>
        <div class="bodyDiv fontDinpro">
            <div class="divContent">
                <p class="fontDinproMedium">Status:</p>
                <div class="rightContent">
                    <div class="locationGroup listGroupDown listGroup">
                        <a class="btnLeft btnPrimary fontDinpro" href="javascript:void(0)" value="1">
                            正常
                        </a>
                        <a class="btnRight btnPrimary" href="javascript:void(0)"><span class="caretBottom"></span></a>
                        <input type="hidden" name="status" id="status" value="1" />
                        <ul class="dropDownList fontDinpro">
                            <li>
                                <a href="javascript:void(0)" class="fontDinpro" value="1">
                                    正常
                                </a>
                            </li>
                            <li>
                                <a href="javascript:void(0)" class="fontDinpro" value="2">
                                    冻结
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
                <label class="fontDinpro snapRight autoWidth">*设置用户状态，设为冻结用户将不可登录.</label>
                <?php if(form_error('status')!=''){ ?>
                    <label class="waring fontDinpro noFloat snapRight autoWidth"><?php echo form_error('status'); ?></label>
                <?php } ?>
            </div>
        </div>
        <button class="btn submitBtn fontDinproBold" href="javascript:void(0)" type='submit'>SUMBIT</button>
        <?php echo form_close(); ?>
    </div>
</div>
